<local:DocumentBase x:Class="WPFExcelReport.GTTVK05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                     xmlns:WG="clr-namespace:WPFExcelReport;assembly=TWGBST"
                    xmlns:WD="clr-namespace:WPFExcelReport;assembly=TWDECK" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:VP="clr-namespace:WPFExcelReport;assembly=TVVPACK"  
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN" 
                    xmlns:VKK="clr-namespace:WPFExcelReport;assembly=TVKKOPF" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS" 
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"   
                     xmlns:U="clr-namespace:WPFExcelReport;assembly=ITXUI"
                    xmlns:VR="clr-namespace:WPFExcelReport;assembly=TVRKOPF"  
                    xmlns:VRP="clr-namespace:WPFExcelReport;assembly=TVRPOS"
                    xmlns:VVT="clr-namespace:WPFExcelReport;assembly=TVVTLIEF"
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:TK="clr-namespace:WPFExcelReport;assembly=TTXTKON"  
                    xmlns:MAH="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    xmlns:me="clr-namespace:WPFExcelReport"
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
                    Height="900"
                    Width="1440"
                    Name="TV"  
                    Loaded="Window_Loaded"
>
    <local:DocumentBase.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:Divideby10000 x:Key="dw"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:NOTConverter  x:Key="not"/>
    </local:DocumentBase.Resources>
    <DockPanel>  
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <WrapPanel Grid.Row="0"  Visibility="{Binding KDBLOCK,ElementName=cKD,Converter={StaticResource bv}}">
                <TextBlock    Margin="5"
                              Foreground="Red"
                            Text="{Binding Source={Localization:Translate Word=KDCREDITEXC}}"
                       />
                <TextBlock   Margin="5"
                             Foreground="Red"
                            Text="{Binding VKBLOCK,ElementName=cKD}"
                       />
                <CheckBox Content="{Binding Source={Localization:Translate Word=关闭此提示}}"   Foreground="Red"
                            Margin="5,0,0,0"
                          IsChecked="{Binding KDBLOCK,ElementName=cKD,Converter={StaticResource not}}"/>

            </WrapPanel>
            <Grid Grid.Row="1" > 
                <Grid.RowDefinitions>
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="1.2*" />
                    <RowDefinition   Height="1*" />
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="Auto" /> 
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <U:TGTTVK04 Name="cVKK"  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" 
                     IsOrder="True"
                     KDBLOCK="{Binding KDBLOCK,ElementName=cKD}"   
                     IsCanDelete="{Binding IsCanDelete,ElementName=TV}" 
                     IsCanNew="{Binding IsCanNew,ElementName=TV}" 
                     IsCanChg="{Binding IsCanChg,ElementName=TV}"  
                     IsChgZA="{Binding IsChgZA,ElementName=TV}"
                     ScopeManage="{Binding ScopeManage,ElementName=TV}"  />
                <WD:TPWD02 Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                       Visibility="Collapsed"
                       IsAuto="{Binding IsAutoEK,ElementName=cVKK}"
                       EKAUF="{Binding EKAUF,ElementName=cVKK}"
                       VKK="{Binding AUF,ElementName=cVKK}"/>
                <U:TSJHVKP  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                           KURS="{Binding KURS,ElementName=cVKK}"
                           IsExpandAll="{Binding IsExpandAll,ElementName=TV}"
                             Name="cVKP" 
                             ARTST="F" 
                             IsPrice="True"   
                             IsAuto="True" 
                            UMLMS="M;YD;YRD;"
                             IsPringPR="{Binding IsPringPR,ElementName=TV}" 
                             IsPringPRCN="{Binding IsPringPRCN,ElementName=TV}"
                             IsPringPREN="{Binding IsPringPREN,ElementName=TV}"
                             IsCanDelete="{Binding IsCanDelete,ElementName=TV}" 
                             IsCanNew="{Binding IsCanNew,ElementName=TV}" 
                              IsCanChg="{Binding IsCanChg,ElementName=TV}" 
                             IsCanCopy="{Binding IsCanCopy,ElementName=TV}"  
                              BSTSTA="{Binding KDSTA,ElementName=cVKK}"      
                              WERT="{Binding WERT,ElementName=cVKK}"  
                              dwVKK="{Binding dwVKK,ElementName=cVKK}"  
                             IsEdit="{Binding IsEdit,ElementName=cVKK}" 
                             IsSaved="{Binding IsSaved,ElementName=cVKK}" 
                             MinWidth="200" MinHeight="50" />
                <DR:TDRAUFTR  Grid.Column="0" Name="cDR"
                              DocType="UBTVKPPROD" Visibility="Collapsed" PrintType="OpenExcel" />
                <DR:TDRAUFTR  Grid.Column="0" Name="cDRCN" 
                              DocType="UBTVK04CN" Visibility="Collapsed" PrintType="OpenExcel" />
                <DR:TDRAUFTR  Grid.Column="0" Name="cDREN" 
                              DocType="UBTVK04EN" Visibility="Collapsed" PrintType="OpenExcel" />
                <TabControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
                    <TabItem Header="织边数量" Name="ZoneZBQ" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}">
                        <TK:TPUTZBQTY Name="cZBQTY" Grid.Row="0"
                            IsCanLoad="{Binding IsSelected,ElementName=ZoneZBQ}"
                            IsInfoOneLine="True"
                            PIND="{Binding VKPPIND,ElementName=cVKP}" 
                           QTY="{Binding QTY,ElementName=cVKP}"/>
                    </TabItem>
                    <TabItem Header="织边" Name="ZoneZB" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}">
                        <TK:TPUTZB Name="cZB"  Grid.Row="1"
                            IsInfoOneLine="True"
                           IsCanLoad="{Binding IsExpanded,ElementName=ZoneZB}"
                            PIND="{Binding PIND,ElementName=cVKP}" />
                    </TabItem>
                    <TabItem  Header="附加费" Name="ZoneZBP" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}"
                             > 
                        <ZB:TVKZUAB  Name="cZBP" 
                        Margin="10"
                        IsAuto="True"   
                        MaxHeight="300" 
                        VKZSA="VK" 
                       ORDERNUM="{Binding AUF,ElementName=cVKP}"  />
                    </TabItem>
                    <TabItem   Header="生产发货信息" Name="ZoneDel" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1*"></ColumnDefinition>
                                <ColumnDefinition Width="1*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <VVT:TVVTLIEF  Grid.Column="0"  Name="cVVT"  
                                 IsWBREQ="False"  
                                 IsAuto="False" 
                                 IsCanLoad="{Binding IsExpanded,ElementName=ZoneDel}"
                                 VKP="{Binding AUF,ElementName=cVKP}"
                               />
                            <StackPanel  Grid.Row="0" Grid.Column="1">
                                <WD:TWDECK  Name="cWD"   
                                        IsCanLoad="{Binding IsExpanded,ElementName=ZoneDel}"
                                    ORDERNUM="{Binding AUF,ElementName=cVKP}"
                                    IsOrder="True"
                                   />
                                <WG:TWGBST dwWD="{Binding dwWD,ElementName=cWD}"/>
                            </StackPanel>
                        </Grid>
                    </TabItem>
                    <TabItem Header="客户信息" Name="ZoneKD" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}">
                        <KD:TKD Grid.Row="0" Name="cKD"
                           IsCanLoad="{Binding IsExpanded,ElementName=ZoneKD}"
                            ORDERNUM="{Binding KUNDNR,ElementName=cVKK}"   
                            />
                    </TabItem>
                    <TabItem  Header="发票信息"   Name="ZoneINV" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="1*"/>
                            </Grid.RowDefinitions>
                            <VRP:TVR05 Grid.Row="0" ARTST="F" Name="cVR05" 
                                  IsFilterByVKP="True"
                                  MaxHeight="300"
                                  IsAuto="False"
                                  RENR="{Binding KEY,ElementName=cVRK}"
                                  dwZB="{Binding dwZB,ElementName=cZBP}"  
                                  dwVKP="{Binding dwVKP,ElementName=cVKP}"  
                                 />
                            <Grid Grid.Row="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                </Grid.RowDefinitions>
                                <VRP:TVKKVR05 Grid.Row="1" 
                                      IsCanLoad="{Binding IsExpanded,ElementName=ZoneINV}"
                                       VKK="{Binding AUF,ElementName=cVKP}" 
                                       IsAuto="False"  />
                                <VR:TVR04  Grid.Row="2" Name="cVRK" 
                                    IsCanLoad="{Binding IsExpanded,ElementName=ZoneINV}"
                                    IsAuto="{Binding IsAutoVRK,ElementName=cVKK}"
                                    VKK="{Binding AUF,ElementName=cVKK}"
                                    KEY="{Binding RENR,ElementName=cVKK}" 
                                    />

                            </Grid>
                        </Grid>
                       
                    </TabItem>
                    <TabItem  Header="品种信息"   Name="ZoneWS" IsSelected="{Binding IsExpandAll,ElementName=TV,Mode=OneWay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1*"></ColumnDefinition>
                                <ColumnDefinition Width="1*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <WS:TWASTAMM  Grid.Row="0" Grid.Column="0" Margin="10" 
                               IsAuto="False" Name="cWS"
                               IsCanLoad="True"
                               ORDERNUM="{Binding PRART,ElementName=cWD}"/>
                            <ZB:TVAPR  Grid.Row="0" Grid.Column="1"
                               IsCanLoad="{Binding IsShowBottom,ElementName=TV}"
                               VKZAUF="{Binding VART,ElementName=cVKP}"/>
                        </Grid>
                    </TabItem>
                </TabControl> 
            </Grid>
        </Grid>
    </DockPanel>
</local:DocumentBase>
    
